// 二分答案法
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int n;
int a[500005];
int ans;
bool check(int x) {
  for (int i = 1; i <= x; i++) {
    if (a[i] > a[n - x + i] / 2)
      return 0;
  }
  return 1;
}
signed main() {
  cin >> n;
  for (int i = 1; i <= n; i++)
    cin >> a[i];
  int l = 0, r = n / 2, mid;
  while (l <= r) {
    mid = (l + r) / 2;
    if (check(mid)) {
      ans = mid;
      l = mid + 1;
    } else
      r = mid - 1;
  }
  cout << ans << endl;
  return 0;
}
